﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ICE.Vacations.Logica.Consultas;

namespace ICE.Vacations.WebASP
{
    public partial class consultaRP : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                cargarSolicitudes();
            }
            catch (Exception ex)
            {
                throw (ex);
                //Response.Redirect("Default.aspx", true);
            }
        }

        public void cargarSolicitudes()
        {
            //if (!filtro.Text.Trim().Equals(""))
            //{
            //    listaSolicitudes.DataSource = //QueryManager.consultaRemanentesPeriodo(); 
            //    QueryManager.consultaRemanentesPeriodo(Request.Cookies["username"].Value, listaCampos.SelectedValue, filtro.Text);
            //}
            //else
            //{
                listaSolicitudes.DataSource = QueryManager.consultaRemanentesPeriodo((string)Session["username"]);
                

            //}
            listaSolicitudes.DataBind();
        }

        protected void listaSolicitudes_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            for (int i = 0; i < e.Row.Cells.Count; i++)
            {
                e.Row.Cells[i].Attributes.Add("style", "white-space: nowrap;");
            }
        }
    }
}